package com.yanqu.road.server.cmd.union.cross;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.union.cross.CrossUnionProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.player.WorldMessageMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_UNION_MEMBER_CHAT, desc = "商会成员聊天")
public class CrossUnionMemberChatCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

        CrossUnionProto.UnionMemberChatReqMsg reqMsg = CrossUnionProto.UnionMemberChatReqMsg.parseFrom(packet.getBytes());

        WorldMessageMgr.sendUnionChat(serverId, packet.getPlayerId(), reqMsg.getMsg().toBuilder(), reqMsg.getUnionUid());

    }

    @Override
    public void sendData() {

    }
}
